from flask import Flask
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)

DIALCT = "mysql"
DRIVER = "pymysql"
USERNAME = "root"
PASSWORD = "Yuan2000_"
HOST = "http://bj-cdb-hjbj4oh0.sql.tencentcdb.com"
PORT = "60670"
DATABASE = "tencentmysql"
DB_URI = "{}+{}://{}:{}@{}:{}/{}?charset=utf8".format(DIALCT, DRIVER, USERNAME, PASSWORD, HOST, PORT, DATABASE)

app.config["SQLALCHEMY_DATABASE_URI"] = DB_URI
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)

from app import views
